/*
 * 
 * 
 * 
 */
package com.hboxs.asl.service.impl;

import com.hboxs.asl.Filter;
import com.hboxs.asl.Page;
import com.hboxs.asl.Pageable;
import com.hboxs.asl.dao.WithdrawalDao;
import com.hboxs.asl.entity.Member;
import com.hboxs.asl.entity.Withdrawal;
import com.hboxs.asl.service.WithdrawalService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Service - 提现记录
 */
@Service("withdrawalServiceImpl")
public class WithdrawalServiceImpl extends BaseServiceImpl<Withdrawal, Long> implements WithdrawalService {

    @Resource(name = "withdrawalDaoImpl")
    private WithdrawalDao withdrawalDao;

    @Resource(name = "withdrawalDaoImpl")
    public void setBaseDao(WithdrawalDao withdrawalDao) {
        super.setBaseDao(withdrawalDao);
    }


    @Override
    public Page<Withdrawal> findPageByMember(Pageable pageable, Member member) {
        pageable.getFilters().add(Filter.eq("member" , member));
        return findPage(pageable);
    }
}
